package com.lj.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
//用户登录路径
@RequestMapping("/login")
public class LoginController {
	//检查用户登录,post提交
	@RequestMapping(value="/check.do",method=RequestMethod.POST)
	@ResponseBody
	//注解接收参数
	public String checkUser(@RequestParam("username") String name,@RequestParam("password") String pass){
		return "hello:"+name+","+pass;
	}
}
